package com.chenwut.stringDemo;

public class StringDemo8 {
    public static void main(String[] args) {
        String talk = "我艹，会不会玩TMD";

        //敏感词库
        String[] arr = {"艹", "草", "TMD", "NMD", "MD"};
        for (int i = 0; i < arr.length; i++) {
            talk = talk.replace(arr[i], "***");
        }

        System.out.println(talk);
    }
}
